﻿using SmartPlant.Model;
using SmartPlant.Model.DbContext.Biz;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;

namespace SmartPlant.Services.Interfaces
{
    /// <summary>
    /// report背后file的操作
    /// </summary>
    public interface ITemplateFilesService
    {
        #region report背后，vault里的文件相关
        /// <summary>
        /// 下载report背后的具体模板文件
        /// </summary>
        /// <param name="proId"></param>
        /// <param name="report">记得Name里要带上文件的后缀（.xlsx）</param>
        /// <returns></returns>
        Task<RESTfulResult<Stream>> DownloadTemplateFileAsync(string proId, Report report);

        /// <summary>
        /// 上传report背后的文件
        /// </summary>
        /// <param name="proId"></param>
        /// <param name="templateType"></param>
        /// <param name="templatepath"></param>
        /// <param name="stream"></param>
        /// <param name="fileName"></param>
        /// <returns></returns>
        Task<bool> UploadTemplateFileAsync(string proId, TemplateType templateType, Stream stream, string fileName, int InOrOut);

        #endregion
    }
}
